﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Pan;
public partial class Pages_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request["reuid"] != null)
                Pan.Cookie.WriteCookie("reuid", Request["reuid"].ToString(), 120);
            if (Request["c"] != null)
            {
                Pan.Sys_Config.InitCity(Request["c"].ToString());
                Response.Redirect("/Pages/index.aspx");
            }
            else
            {

            }
        }

    }
    protected void submit_onclick(object sender, EventArgs e)
    {
        string mail = city_email.Value.Trim();
        Tuan.Model.SubInfo model = new Tuan.Model.SubInfo();
        model.CityID = Convert.ToInt32(Pan.Sys_Config.GetCurrentCityID());
        model.Email = mail;
        model.SubType = 1;
        int flag = (new Tuan.BLL.SubInfo()).Add(model);
        if (flag > 0)
            Pan.Common.MessageBox.Show(this,"提交成功！");
        else
            Pan.Common.MessageBox.Show(this,"提交失败，请稍候再试！");
    }
}
